var SocialConnectorManager = null;

_SocialConnectorManager = function(){
	this.Connectors = [];	
}

_SocialConnectorManager.prototype = {
	GetSocialConnectorItem: function(){
		return {
			Name: null,
			Status: null,
			UIStatus: null,
			PlaceholderRel: null
		}
	},
	RegisterSocialConnectorItem: function(connector){
		this.Connectors.push(connector);
	},
	CloseOtherSocialConnectorsUI: function(connectorName){
		for(var i=0,ic=this.Connectors.length;i<ic;i++){
			if(this.Connectors[i].Name != connectorName && this.Connectors[i].UIStatus){
				this.Connectors[i].UIStatus = false;
				$("#" + this.Connectors[i].PlaceholderRel).hide("fast");
			}
		}
	},
	ToggleSocialConnectorUI: function(connectorName){
		SocialConnectorManager.CloseOtherSocialConnectorsUI(connectorName);
		for(var i=0,ic=this.Connectors.length;i<ic;i++){
			if(this.Connectors[i].Name == connectorName){
                if(!this.Connectors[i].UIStatus){
                    this.Connectors[i].UIStatus = true;
                    $("#" + this.Connectors[i].PlaceholderRel).show("fast");
                }else{
                    this.Connectors[i].UIStatus = false;
                    $("#" + this.Connectors[i].PlaceholderRel).hide("fast");
                }
				break;
			}
		}
	}
}